import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class TestDemo1 {
    public static void main(String[] args) {
        ExecutorService pool = Executors.newFixedThreadPool(10);
        for(int i = 1; i < 100;i++) {
            int n = i;
            pool.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("任务"+n);
            }
        });
        }
    }
}
